<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/4.1.0/css/bootstrap.min.css">
    <script type="text/javascript" src="../js/jquery-1.7.min.js"></script>
    <script type="text/javascript" src="../js/jquery-ui-1.8.16.custom.min.js"></script>
    <script type="text/javascript" src="../js/jquery.cookie.js"></script>
    <script type="text/javascript" src="../js/jquery.alerts.js"></script>
    <script type="text/javascript" src="../js/jquery.uniform.min.js"></script>
    <script type="text/javascript" src="../js/general.js"></script>
    <script type="text/javascript" src="../js/blog.js"></script>
    <script src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
    <script src="https://cdn.bootcss.com/popper.js/1.12.5/umd/popper.min.js"></script>
    <script src="https://cdn.bootcss.com/bootstrap/4.1.0/js/bootstrap.min.js"></script>
    <title>发布竞赛</title>
    <link rel="stylesheet" href="../css/style.default.css" type="text/css" />
    <!--[if lte IE 8]><script language="javascript" type="text/javascript" src="../js/plugins/excanvas.min.js"></script><![endif]-->
    <!--[if IE 9]>
    <link rel="stylesheet" media="screen" href="../css/style.ie9.css"/>
    <![endif]-->
    <!--[if lt IE 9]>
    <![endif]-->
    <link rel="stylesheet" media="screen" href="../css/style.ie8.css"/>
    <!--[if lt IE 9]>
    <script src="..js/plugins/css3-mediaqueries.js"></script>
    <![endif]-->
    <script src="../js/selfExam.js"></script>
    <script src="../js/model.js"></script>
    <script src="../js/ajaxAPI.js"></script>

</head>
<script src="../js/change.js"></script>
<body class="withvernav" onload="initDate()">

<div class="bodywrapper">
    <div class="topheader">
        <div class="left">
            <h1 class="logo"><span>ZZTY</span></h1>
            <span class="slogan">自在天原学习系统</span>

            <br clear="all" />

        </div><!--left-->
        <!--<% User user=(User)session.getAttribute("user");-->
        <!--%>-->
        <div class="right">
            <!--<div class="notification">
                <a class="count" href="ajax/notifications.html"><span>9</span></a>
            </div>-->
            <div class="userinfo">
                <a href=""><img src="../images/thumbs/avatar.png" alt="" /></a>
                <!--<span><%=user.getName()%></span>-->
            </div><!--userinfo-->

            <div class="userinfodrop">
                <div class="avatar">
                    <a href=""><img src="../images/thumbs/avatarbig.png" alt="" /></a>

                </div><!--avatar-->
                <div class="userdata">
                    <!--<ul>-->
                        <!--<li>名字:<%=user.getName()%></li>-->
                        <!--<li>班级:java<%=user.getClassId()%>班</li>-->
                        <!--<li>邮箱:<%=user.getEmail()%></li>-->
                        <!--<li>类型:<%=user.getType()%></li>-->
                        <!--<li><a href="change.jsp">修改信息</a></li>-->
                        <!--<li><a href="../login.jsp">退出</a></li>-->
                    <!--</ul>-->
                </div><!--userdata-->
            </div><!--userinfodrop-->
        </div><!--right-->
    </div><!--topheader-->


    <div class="header">
        <ul class="headermenu">
            <li><a href="Tmain.html"><span class="icon icon-flatscreen"></span>首页</a></li>
            <li  ><a href="teamExam.html"><span class="icon icon-pencil"></span>结对</a></li>
            <li class="current"><a href="competion.html"><span class="icon icon-message"></span>竞赛</a></li>
            <li><a href="share.jsp"><span class="icon icon-chart"></span>课堂分享</a></li>
        </ul>



    </div><!--header-->

    <div class="vernav">
        <ul>
            <li class="current"><a href="competion.html" class="editor">发布竞赛</a></li>
            <li><a href="selfCorrectHomework.html">批改作业</a></li>
            <li><a href="selfStudentScore.html">竞赛历史</a></li>
        </ul>
        <a class="togglemenu"></a>
    </div><!--leftmenu-->

    <div class="centercontent">

        <div class="pageheader">
            <h1 class="pagetitle">创建竞赛：</h1>
            <span class="pagedesc">
                <hr/>
                <table>
                    <tr>
                        <td><h3>* 日期：</h3></td>
                        <td><input type="date" id="tdate"/></td>
                    </tr>
                    <br/>
                    <tr>
                        <td><h3>* 题目：</h3></td>
                        <td><textarea id="tquestion" rows="3" cols="20" style="margin: 0px; width: 683px; height: 117px;font-size:15px; color:#333333"></textarea></td>
                    </tr>
                    <tr>
                        <td></td>
                        <td><button type="button" class="btn btn-primary" onclick="insertTo()">添加</button>
                        <button type="button" class="btn btn-primary" data-toggle="modal" data-target="#myModal"  onclick="initTable()">
                            题库
                        </button></td>
                    </tr>
                    <tr style="display:none;" id="hidetd">
                        <td ><h3>* 班级：</h3></td>
                        <td>
                            <select id="s1">
                                <option value="7" selected>java7</option>
                            </select>
                        </td>
                    </tr>
                </table>
                <div class="form-group">
									<label for="dtp_input2" class="col-md-2 control-label">最终题目：</label>
									<div class="col-md-6">
										<!--   Basic Table  -->
										<div class="panel panel-default">

											<div class="panel-body">
												<div class="table-responsive">
													<table name="tableQuestions" class="table table-striped table-bordered table-hover" id="tques" style="word-break: break-all; word-wrap: break-all;">
														<tbody id="tb"><tr>
															<th style="display:none;">题号</th>
                                                            <th>id</th>
															<th>题目</th>
															<th>删除</th>
														</tr>

														</tbody><tbody>


														</tbody>
													</table>
                                                      <tr>
                        <td></td>
                        <td><input type="button" value=" 提交 " onclick="checkDate()"></td>
                    </tr>

												</div>
											</div>
										</div>
									</div>
								</div>
            </span>


        </div><!--pageheader-->

        <div id="contentwrapper" class="contentwrapper">
            <!--add you page at here-->
            <!--add you page at here-->
            <!--add you page at here-->
            <!--add you page at here-->
            <!--add you page at here-->
            <!--add you page at here-->

        </div><!--contentwrapper-->

        <br clear="all" />

    </div><!-- centercontent -->


</div><!--bodywrapper-->

<!-- 模态框 -->
<div class="modal fade" id="myModal">
    <div class="modal-dialog">
        <div class="modal-content">

            <!-- 模态框头部 -->
            <div class="modal-header">
                <h4 class="modal-title">竞赛题库</h4>
                <button type="button" class="close" data-dismiss="modal">&times;</button>
            </div>

            <!-- 模态框主体 -->
            <div class="modal-body" >
                <table cellpadding="0" cellspacing="0" border="0" class="stdtable" id="t1">
                        <colgroup>
                            <col class="con0" />
                            <col class="con1" />
                            <col class="con2" />
                        </colgroup>
                        <thead>
                        <tr>
                            <th class="head0">id</th>
                            <th class="head1">content</th>
                            <th class="head1">选择</th>
                        </tr>
                        </thead>

                        <tbody>
                        </tbody>
                    </table>
    </div>
</div>

            <!-- 模态框底部 -->

            <div class="modal-footer">
                <button type="button" class="btn btn-secondary" data-dismiss="modal">关闭</button>
                <button type="button" class="btn btn-primary" data-dismiss="modal">
                    提交
                </button>
            </div>

        </div>
    </div>

</div>

<style>
    td{
        text-align:left;
        vertical-align:top;

    }
    input[type="button"] {
        width: auto;
        margin: 0;
        font-weight: bold;
        color: #eee;
        background: #FB9337;
        border: 1px solid #F0882C;
        padding: 7px 10px;
        -moz-box-shadow: none;
        -webkit-box-shadow: none;
        box-shadow: none;
        cursor: pointer;
        -moz-border-radius: 2px;
        -webkit-border-radius: 2px;
        border-radius: 2px;
    }
</style>

</body>
</html>
